package net.easyjava.third.letv.bean;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import net.easyjava.tools.BaseBean;

/**
 * 乐视接口返回的公共参数
 * Created by wxnacy on 16/6/28.
 */
public class LetvResult extends BaseBean {
    private static final long serialVersionUID = -8763613787673842056L;
    private int code;//状态值：0表示操作成功；其它值表示失败，具体含义见message说明
    private String message;//
    private int total;//符合条件的记录数量
    private JSONObject data;


    public LetvResult() {
    }

    public boolean isSuccess(){
        return this.code ==0;
    }

    public boolean isError(){
        return this.code !=0;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public JSONObject getData() {
        return data;
    }

    public void setData(JSONObject data) {
        this.data = data;
    }
}
